package com.xzh.springCloud.controller;

import com.xzh.springCloud.entity.Order;
import com.xzh.springCloud.entity.Result;
import com.xzh.springCloud.service.OrderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: zhiHong
 * @CreateTime: 2023-09-01 11:46
 * @Description:
 */
@RestController
public class OrderController {
    @Resource
    private OrderService orderService;

    @PostMapping("/order/save")
    public Result save(Order order) {
        System.out.println(order);
        orderService.save(order);
        return Result.success("订单创建成功", null);
    }
}
